public class TestArrayList {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<Integer>();
        System.out.println(list);
        for (int i = 1; i <= 12; i++) {
            list.add(i);
        }
        System.out.println(list);
        for (int i = 1; i <=7; i++) {
            System.out.println(list.remove(0));
        }
        System.out.println(list);
        for (int i = 1; i <=4; i++) {
            System.out.println(list.remove(0));
        }
        System.out.println(list);
        System.out.println(list.get(0));
//        System.out.println(list.get(7));
        System.out.println(list.set(0,666));
        System.out.println(list);
    }
}